﻿@model Weibo.Web.Models.MbIndexModel
@{
    var border = "";
    if (Model.CurUserConfig.IsThemeDIY == 1)
    {
        ThemeDIY diy = Themes.GetThemeDIYByUID(Model.CurUser.ID);
        border = diy.BorderStyle + "Bg";
    }
    ViewData["curBorder"] = border;
    Group g = null;

    if (Model.gid != null)
    {
        g = Groups.GetGroupByID(Convert.ToInt64(Model.gid));
    }

    IList<Group> allGroups = Groups.GetGroupsByUID(Model.CurUser.ID);
    IList<Group> barGroups = null;
    IList<Group> popListGroups = null;
}
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
    ViewBag.Title = "我的首页 "+BaseConfigs.GetWebTitle+"-随时随地分享身边的新鲜事儿";
}
@section  cssInsert{
    <link rel="stylesheet" type="text/css" href="/Content/CSS/miniblog/index.css" />
    <link rel="stylesheet" type="text/css" href="@Model.CurSkinCss" />
    <link rel="stylesheet" type="text/css" href="/Content/CSS/miniblog/layer.css" />
    <link href="../../Content/CSS/guid.css" rel="stylesheet" type="text/css" />
}
@section  jsInsert{
    <script type="text/javascript">
        curBorder = "@border";
    </script>
    <script src="/Swfupload/swfupload.js" type="text/javascript"></script>
    <script src="/Swfupload/swfupload.cookies.js" type="text/javascript"></script>
    <script src="/Swfupload/swfupload.queue.js" type="text/javascript"></script>
    <script src="/Swfupload/fileprogress.js" type="text/javascript" charset="GB2312"></script>
    <script src="/Swfupload/handler.js" type="text/javascript" charset="GB2312"></script>
    <script src="/Scripts/DatePicker.js" type="text/javascript"></script>
    <script src="../../Scripts/guide.js" type="text/javascript"></script>
    <script src="../../Scripts/js/blogIndex.js" type="text/javascript"></script>
}
@section  conSupplement{
    <div class="nfTaglay" style="z-index: 99; position: absolute; display: none;">
        <ul class="sltmenu_m">
            @{
                if (popListGroups != null)
                {
                    for (int i = 0; i < popListGroups.Count; i++)
                    {
                <li pop="1"  gid="@popListGroups[i].ID" class="txt"><a href="@("#!" + Utils.AddQueryToUrl(Request.Url.AbsolutePath, "gid", popListGroups[i].ID.ToString()))">@popListGroups[i].Name</a></li>
                    }
                }
            }
            <li class="MIB_linedot2"></li>
            <li><a id="MIB_creategroup" href="javaScript:void(0);">
                <img title="创建分组" class="iconadd" src="/Content/Image/transparent.gif">创建分组</a></li>
            <li><a id="Adjust_group_order" href="javaScript:void(0);">
                <img title="调整分组顺序" class="iconord" src="/Content/Image/transparent.gif">调整分组顺序</a></li>
            <li><a href="@Model.CurUser.ID/follow">
                <img title="管理分组" class="iconsetup" src="/Content/Image/transparent.gif">管理分组</a></li>
        </ul>
    </div>
}
<div class="MIB_blogbody">
    <div class="MIB_mblogbgr @border">
        <div class="MIB_mblogbgl">
            <div class="mainR MIB_200 MIB_txtar MIB_linkar">
                @RenderPage("~/Views/Shared/_userInfo.cshtml")
                @RenderPage("~/Views/Shared/_rightNav.cshtml")
                @RenderPage("~/Views/Shared/Wedget_HotTopic.cshtml")
                @RenderPage("~/Views/Shared/Wedget_MyFan.cshtml")
                @RenderPage("~/Views/Shared/Wedget_MyFollow.cshtml")
            </div>
            <div id="indexMainL" class="mainL MIB_600 MIB_txtal MIB_linkal">
                <div class="MIB_mbloghead">
                    <div class="MIB_mblogbox">
                        <div class="postWrap">
                            <div class="pngBg">
                                <div class="postOptionBg">
                                </div>
                                <div class="pngGuidBg">
                                </div>
                                <div class="pngAreaBg">
                                </div>
                            </div>
                            <div class="connBg">
                                <div id="publisher_info" class="wordNumBg">
                                    你还可以输入<span class="pipsLim">140</span>字</div>
                                <div class="postOptionBg">
                                    <div id="publisher_faces" class="OnTit">
                                        <img title="表情" class="small_icon faceicon" src="/Content/Image/transparent.gif">
                                        <a tabindex="2" href="javascript:void(0)">表情</a>
                                    </div>
                                    <div id="publisher_pic" class="OnPic">
                                        <span poptype="1" pop="true" id="publisher_image">
                                            <img title="图片" class="small_icon picnormal" src="/Content/Image/fbqimgclose.gif"><a
                                                tabindex="3" href="####">图片</a> </span>
                                    </div>
                                    <div id="publisher_video" class="OnTit">
                                        <img class="small_icon videoicon" title="视频" src="/Content/Image/transparent.gif"><a
                                            tabindex="4" href="javascript:void(0);">视频</a>
                                    </div>
                                    <div id="publisher_music" class="OnTit">
                                        <img class="small_icon musicico" title="音乐" src="/Content/Image/transparent.gif"><a
                                            tabindex="5" href="javascript:void(0);">音乐</a>
                                    </div>
                                    <div id="publisher_topic" class="OnTit">
                                        <img class="small_icon askico" title="话题" src="/Content/Image/transparent.gif"><a
                                            tabindex="6" href="javascript:void(0);">话题</a>
                                    </div>
                                    <div class="OnTit" id="publisher_vote">
                                        <img src="/Content/Image/transparent.gif" class="small_icon voteicon" title="投票"><a
                                            tabindex="7" href="javascript:void(0);">投票</a>
                                    </div>
                                </div>
                                <div class="postBtnBg bgColorA_No">
                                    <a title="" tabindex="8" id="publisher_submit" href="javascript:void(0);"></a>
                                </div>
                                <div style="display: block" class="inputarea">
                                    <label style="display: none;" for="publish_editor">
                                        微博输入框</label>
                                    <textarea title="" id="publish_editor" rows="" cols="" name="" accesskey="1" tabindex="1"
                                        style="font-family: Tahoma,宋体; border-style: solid; border-width: 0px; word-wrap: break-word;
                                        font-size: 14px; line-height: 18px; overflow-x: hidden;" range="0&0"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="MIB_mbloglist">
                    <div id="MIB_newFilter" class="newFilter MIB_txtal">
                        <div class="nfTagB nfTagOn">
                            <ul>
                                @{
                                              
                                    if (g != null || Model.IsFriendShip > 0)
                                    {
                                    <li isall="1"><a href="#">所有分组</a></li><li class="MIB_line_l">|</li>
                                    }

                                    else
                                    {
                                    <li isall="1" class="current"><span>所有分组</span></li>
                                    }
                                    if (Model.IsFriendShip > 0)
                                    {
                                                    
                                    <li isfriend="1" class="current"><span>相互关注</span></li>
                                    }
                                    else
                                    {
                                    <li isfriend="1"><a href="@("#!" + Utils.AddQueryToUrl(Request.Url.AbsolutePath, "IsFriendShip", "1"))">
                                        相互关注</a></li><li class="MIB_line_l">|</li>
                                    }

                                    if (allGroups != null && allGroups.Count > 3)
                                    {
                                        barGroups = new List<Group>();
                                        popListGroups = new List<Group>();
                                        for (int i = 0; i < allGroups.Count; i++)
                                        {
                                            if (g != null && allGroups[i].ID == g.ID && i >= 3)
                                            {

                                                Group tmp = barGroups[2];

                                                barGroups[2] = g;

                                                popListGroups.Insert(0, tmp);
                                            }

                                            else
                                            {

                                                if (i < 3)
                                                {

                                                    barGroups.Add(allGroups[i]);

                                                }

                                                else
                                                {

                                                    popListGroups.Add(allGroups[i]);

                                                }

                                            }
                                        }
                                    }
                                    else if (allGroups != null && allGroups.Count <= 3)
                                    {
                                        barGroups = new List<Group>();
                                        for (int i = 0; i < allGroups.Count; i++)
                                        {
                                            barGroups.Add(allGroups[i]);
                                        }
                                    }
                                    if (barGroups != null)
                                    {
                                        for (int i = 0; i < barGroups.Count; i++)
                                        {
                                            if (g != null && barGroups[i].ID == g.ID)
                                            {
														
                                    <li gid="@barGroups[i].ID" class="current"><span title="@barGroups[i].Name" >@barGroups[i].Name<a
                                        href="javascript:void(0);" id="btnManageGroup" onclick="$(this).parent().next().show();return false;"
                                        class="arrow"><cite class="arr_m"></cite></a></span>
                                        <ul class="sltmenu" style="display: none;">
                                            <li><a href="@Model.CurUser.ID/Follow?gid=@barGroups[i].ID">
                                                <img title="管理分组" class="iconsetup" src="/Content/Image/transparent.gif">管理分组</a></li>
                                        </ul>
                                    </li>
                                            }
                                            else
                                            {

                                    <li  gid="@barGroups[i].ID"><a title="@barGroups[i].Name" href="@("#!" + Utils.AddQueryToUrl(Request.Url.AbsolutePath, "gid", barGroups[i].ID.ToString()))">@barGroups[i].Name</a></li><li
                                        class="MIB_line_l">|</li>
                                            }
                                        }
                                    }
                                    <li tip="1"><a href="#" class="moreti"><span class="txt">更多</span><span class="more"></span></a>
                                    </li>
							
                                }
                            </ul>
                            <div class="clear">
                            </div>
                        </div>
                        <div style="" class="nfBox">
                            <div id="filter_key_panel" class="nfBoxSim" style="display: @(Model.IsAdvanced > 0 ? "none" : "block");">
                                <div class="left">
                                    @{
                                        var u = Request.Url.AbsolutePath;
                                        u = "#!" + u;
                                        if (Model.IsHaveMusic != 1 && Model.IsHavePic != 1 && Model.IsHaveVideo != 1 && Model.IsHaveVote != 1 && Model.IsOri != 1)
                                        {
                                        <a title="全部" href="@u" action="all" class="current" id="allBlog">全部</a>
                                        }
                                        else
                                        {
                                        <a title="全部" action="all" href="@u" id="allBlog">全部</a>
                                        }
                                        if (Model.IsOri == 1)
                                        {
                                        <a title="原创" action="IsOri" href="@(Utils.AddQueryToUrl(u, "IsOri", "1"))" class="current">
                                            原创</a>
                                        }
                                        else
                                        {
                                        <a title="原创" action="IsOri" href="@(Utils.AddQueryToUrl(u, "IsOri", "1"))">原创</a>
                                        }
                                        if (Model.IsHavePic == 1)
                                        {
                                        <a title="图片" action="IsHavePic" href="@(Utils.AddQueryToUrl(u, "IsHavePic", "1"))"  class="current">
                                            图片</a>
                                        }
                                        else
                                        {
                                        <a title="图片" action="IsHavePic" href="@(Utils.AddQueryToUrl(u, "IsHavePic", "1"))">
                                            图片</a>
                                        }
                                        if (Model.IsHaveVideo == 1)
                                        {
                                        <a title="视频" action="IsHaveVideo" href="@(Utils.AddQueryToUrl(u, "IsHaveVideo", "1"))"  class="current">
                                            视频</a>
                                        }
                                        else
                                        {
                                        <a title="视频"  action="IsHaveVideo" href="@(Utils.AddQueryToUrl(u, "IsHaveVideo", "1"))">
                                            视频</a>
                                        }
                                        if (Model.IsHaveMusic == 1)
                                        {
                                        <a title="音乐" action="IsHaveMusic" href="@(Utils.AddQueryToUrl(u, "IsHaveMusic", "1"))" class="current">
                                            音乐</a>
                                        }
                                        else
                                        {
                                        <a title="音乐" action="IsHaveMusic" href="@(Utils.AddQueryToUrl(u, "IsHaveMusic", "1"))">
                                            音乐</a>
                                        }
                                        if (Model.IsHaveVote == 1)
                                        {
                                        <a title="投票" action="IsHaveVote" href="@(Utils.AddQueryToUrl(u, "IsHaveVote", "1"))" class="current">
                                            投票</a>
                                        }
                                        else
                                        {
                                        <a title="投票" action="IsHaveVote" href="@(Utils.AddQueryToUrl(u, "IsHaveVote", "1"))">
                                            投票</a>
                                        }
                                           
                                    }
                                </div>
                                <div class="right">
                                    <div class="lf searchbg">
                                        <input type="text" class="input" value="@(string.IsNullOrEmpty(Model.Key) ? "搜索关注人说的话" : Model.Key)" id="filter_mkey_input"
                                                        name="filter_search" style="color: rgb(153, 153, 153);">
                                        <a href="#" class="searcheck" id="filter_mkey_btn">搜索</a><a class="searchadv" href="#"
                                            id="filter_adv_show">高级搜索</a></div>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <!-- 高级-->
                            <div style="display: @(Model.IsAdvanced > 0 ? "block" : "none");" id="filter_adv_panel" class="nfAdv">
                                <div class="close">
                                    <a id="filter_adv_hide" class="rt" href="#">关闭高级搜索</a></div>
                                <input type="hidden" id="gid" name="gid" value="0">
                                <input type="hidden" id="filter_adv_search" name="filter_adv_search" value="1">
                                <dl class="dll1 clearFix">
                                    <dt class="MIB_txtbl">类&nbsp;&nbsp;&nbsp;&nbsp;型：</dt>
                                    <dd>
                                        <div class="subdl">
                                            <label for="filter_ori">
                                                <input type="checkbox" id="filter_ori" name="filter_ori" value="1" @(Model.IsOri > 0 ? "checked" : "") />原创</label>
                                            <label for="filter_ret">
                                                <input type="checkbox" id="filter_ret" name="filter_ret" value="1"  @(Model.IsRet > 0 ? "checked" : "")>转发</label>
                                        </div>
                                        <div class="subdl">
                                            <label for="filter_text">
                                                <input type="checkbox" id="filter_text" name="filter_text" value="1"  @(Model.IsHaveLink > 0 ? "checked" : "")>含短链</label>
                                            <label for="filter_pic">
                                                <input type="checkbox" id="filter_pic" name="filter_pic" value="1"  @(Model.IsHavePic > 0 ? "checked" : "")>含图片</label>
                                            <label for="filter_video">
                                                <input type="checkbox" id="filter_video" name="filter_video" value="1"  @(Model.IsHaveVideo > 0 ? "checked" : "")>含视频</label>
                                            <label for="filter_music">
                                                <input type="checkbox" id="filter_music" name="filter_music" value="1" @(Model.IsHaveMusic > 0 ? "checked" : "")>含音乐</label>
                                            <label for="filter_vote">
                                                <input type="checkbox" id="filter_vote" name="filter_vote" value="1"  @(Model.IsHaveVote > 0 ? "checked" : "")>含投票</label>
                                        </div>
                                    </dd>
                                </dl>
                                <dl class="dll1 dll2 clearFix MIB_linedot2">
                                    <dt class="MIB_txtbl">关键字：</dt>
                                    <dd>
                                        <input type="text" style="color: rgb(153, 153, 153);" name="filter_search" 
                                                        id="filter_adv_input" class="swidth" value="@(string.IsNullOrEmpty(Model.Key) ? "搜索关注人说的话" : Model.Key)">
                                    </dd>
                                    <dt class="MIB_txtbl">时&nbsp;&nbsp;&nbsp;&nbsp;间：</dt>
                                    <dd>
                                        <input type="text" value="@(Model.StartTime != null ? Model.StartTime.Value.ToString("yyyy-MM-dd") : "选择日期")" class="tinp" id="filter_adv_stime" def="选择日期" name="starttime"
                                                        style="color: rgb(153, 153, 153);" readonly="">
                                        <span>至</span>
                                        <input type="text" value="@(Model.EndTime != null ? Model.EndTime.Value.ToString("yyyy-MM-dd") : DateTime.Now.ToString("yyyy-MM-dd"))" class="tinp" id="filter_adv_etime" def="选择日期"
                                                        name="endtime" style="color: rgb(153, 153, 153);" readonly="">
                                    </dd>
                                </dl>
                                <dl class="dll1 dll3 clearFix">
                                    <dt>&nbsp;</dt>
                                    <dd>
                                        <a id="filter_adv_btn" class="btn_normal btnxs" href="#"><em>搜索</em></a></dd>
                                </dl>
                            </div>
                            <!-- /高级 -->
                        </div>
                      
                        <div style="display:@(string.IsNullOrEmpty(Model.Key) && Model.IsAdvanced == 0 ? "none" : "block");" class="nfresult MIB_linedot2">
                            <div class="lf">
                                共搜索到<span class="spetxt">@Model.RecordCount</span>条微博</div>
                            <div class="rt">
                                <a href="@(g != null ? Request.Url.AbsolutePath + "?gid=" + g.ID : Request.Url.AbsolutePath)">
                                    <em>&lt;&lt;</em>返回@(g != null ? g.Name : "全部")</a></div>
                        </div>
                    </div>
                    <div id="loadMB" class="feed_lding MIB_txtbl">
                        <em class="icon_lding"></em>正在加载，请稍候...</div>
                    <div id="loadError" style="display: none;" class="feed_lding MIB_txtbl">
                        <em class="icon_lding"></em>加载失败，<a href="javascript:ajaxGetMiniBlog(true);">请重试</a>...</div>
                    <div id="loadNoresult" style="display: none;" class="feed_lding MIB_txtbl">
                        <em class="icon_lding"></em>此人很懒...</div>
                </div>
            </div>
        </div>
    </div>
</div>


<div id="guide-step">
	<div   id="stepflow03"></div>
	<div   id="stepflow04"></div>
@*	<div class="tipSwitch"></div>*@
</div>

<script type="text/javascript">
//    var tipVisible = GetCookie("tipVisible");
//    var neverShow = GetCookie("neverShow");
//    showSearchTip();
//    setSearchTip();
//    if (tipVisible != "no" && neverShow != "no") {
//        showSearchTip();
//        setSearchTip();
//    }
</script>